<template>
  <!-- 原创 -->
  <div class="centent-find">
    <div class="header">
      <div class="headerd" v-for="item in data.header" :key="item.id">
        <van-image width="130" height="90" lazy-load :src="item.icon_url" />
        <p>{{ item.name }}</p>
      </div>
    </div>

    <div class="top">
      <h3>{{ data.group_name1 }}</h3>
      <router-link to="data.more1" class="more">更多 ></router-link>
    </div>
    <div class="autor" v-for="item in data.author" :key="item.id">
      <div class="centere">
        <div class="center" v-for="item2 in item.authorD" :key="item2.id">
          <van-image width="75" height="75" lazy-load :src="item2.icon_url" />
          <p>{{ item2.name }}</p>
        </div>
      </div>
    </div>
    <div class="top">
      <h3>{{ data.group_name2 }}</h3>
      <router-link to="data.more2" class="more">更多 ></router-link>
    </div>
    <div class="zhuan" v-for="item in data.album" :key="item.id">
      <div class="centere">
        <div
          class="center"
          v-for="(item2, index2) in item.albumD"
          :key="index2"
        >
          <van-image width="75" height="75" lazy-load :src="item2.icon_url" />
          <p>{{ item2.name }}</p>
        </div>
      </div>
    </div>
    <div class="top">
      <h3>{{ data.group_name3 }}</h3>
      <router-link to="data.more2" class="more">更多 ></router-link>
    </div>
    <div class="hot" v-for="item in data.category_square" :key="item.id">
      <div class="centere">
        <div
          class="center"
          v-for="(item2, index2) in item.group_items"
          :key="index2"
        >
          <van-image width="75" height="75" lazy-load :src="item2.icon_url" />
          <p>{{ item2.name }}</p>
        </div>
      </div>
    </div>
    <div class="top">
      <h3>{{ data.group_name4 }}</h3>
      <router-link to="data.more2" class="more">更多 ></router-link>
    </div>
    <div class="ip" v-for="item in data.category_ip" :key="item.id">
      <div class="centere">
        <div
          class="center"
          v-for="(item2, index2) in item.group_items"
          :key="index2"
        >
          <van-image width="75" height="75" lazy-load :src="item2.icon_url" />
          <p>{{ item2.name }}</p>
        </div>
      </div>
    </div>
    <div class="top">
      <h3>{{ data.group_name5 }}</h3>
      <router-link to="data.more2" class="more">更多 ></router-link>
    </div>
    <div class="style" v-for="item in data.fengge" :key="item.id">
      <div class="centere">
        <div
          class="center"
          v-for="(item2, index2) in item.group_items"
          :key="index2"
        >
          <van-image width="75" height="75" lazy-load :src="item2.icon_url" />
          <p>{{ item2.name }}</p>
        </div>
      </div>
    </div>
    <div class="top">
      <h3>{{ data.group_name6 }}</h3>
      <router-link to="data.more2" class="more">更多 ></router-link>
    </div>
    <div class="yuansu" v-for="item in data.yuansu" :key="item.id">
      <div class="centere">
        <div
          class="center"
          v-for="(item2, index2) in item.group_items"
          :key="index2"
        >
          <van-image width="75" height="75" lazy-load :src="item2.icon_url" />
          <p>{{ item2.name }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import api from "@/api/index";
export default {
  data() {
    return {
      data: [],
    };
  },
  async created() {
      let { data } = await api.getOriginal();
      this.data = Object.freeze(data);
      console.log(this.data.author);
  },
};
</script>

<style lang="less">
.centent-find {
  width: 300px;
  margin: 0 10px 10px 10px;
  box-sizing: border-box;
  position: relative;
  right: 0;
}
.headerd {
  display: inline-block;
  margin-right: 7px;
  p {
    text-align: center;
    font-weight: 300;
    font-style: normal;
    margin: auto;
    margin-top: 8px;
  }
}
/deep/ .van-image {
  .van-image__img {
    border-radius: 6px;
  }
}
p {
  font-size: 14px;
  text-align: center;
  margin: 5px 20px 5px 0;
  width: 70px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  text-align: center;
  margin: 5px 0 5px 0;
}
.top {
  display: flex;
  justify-content: space-between;
  justify-items: center;
  border-left: 3px solid #f56555;
  height: 20px;
  margin-top: 20px;
  margin-bottom: 15px;
  h3 {
    font-weight: normal;
    font-size: 16px;
    height: 15px;
    margin: 0px;
    box-sizing: border-box;
    padding-left: 5px;
  }
  a {
    font-size: 14px;
    color: #f56555;
    height: 15px;
    box-sizing: border-box;
  }
}
.centere {
  margin-left: 5px;
}
.center {
  display: inline-block;
  width: 90px;
}
.autor {
  p {
    width: 70px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
    text-align: center;
    margin: 5px 0 5px 0;
  }

  /deep/ .van-image {
    display: inline-block;

    .van-image__img {
      border-radius: 50%;
      margin: auto;
    }
  }
}
</style>